package com.aaa.demo02;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test {
    public static void main(String[] args) {
        Info<Integer> info = new Info<>();
        info.setA(1);
        fun(info);
        Info<String> info1 = new Info<>();
        info1.setA("lll");
        fun(info1);
    }
    public static void fun(Info <?> info){
        info.show();
    }
}
class Info<T>{
    private T a;

    public void show(){
        System.out.println("这是一句话");
    }

    public T getA() {
        return a;
    }

    public void setA(T a) {
        this.a = a;
    }
}
